// 文章审核数据请求
import qs from 'qs'
import { request } from './request'

// 获取用户待审核文章
export function getAudit () {
  return request({
    url: '/admin/article/getAudit'
  })
}

// 文章审核通过
export function passAudit (article_id) {
  return request({
    url: '/admin/article/passAudit/' + article_id,
    method: 'post'
  })
}

// 文章审核不通过
export function failAudit (article_id, auditing_reason_id) {
  return request({
    url: '/admin/article/failAudit',
    method: 'post',
    headers:{'Content-Type':'application/x-www-form-urlencoded'},
    data: qs.stringify({
      article_id,
      auditing_reason_id
    })
  })
}